package com.gss.security.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class AuthenticationController {

@RequestMapping("/login.htm")
public ModelAndView getLoginPage(){	
		
		return new ModelAndView("loginPage");
	}	

@RequestMapping(value="/loginFailed.htm", method = RequestMethod.GET)
public String loginerror(ModelMap model) {
	System.out.println("auth failed...");
	model.addAttribute("error", "true");
	return "loginPage";

}

@RequestMapping(value="/logout.htm", method = RequestMethod.GET)
public String logout(ModelMap model) {

	return "loginPage";

}
}
